# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-flask-security
_pkgname=flask-security
pkgver=3.0.0
pkgrel=10
pkgdesc='Quick and simple security for Flask applications'
url='https://github.com/mattupstate/flask-security'
arch=('any')
license=('MIT')
depends=('python' 'python-flask' 'python-flask-login' 'python-flask-mail'
         'python-flask-principal' 'python-flask-wtf' 'python-flask-babelex'
         'python-itsdangerous' 'python-passlib' 'python-email-validator')
makedepends=('python-flask' 'python-flask-login' 'python-flask-mail'
             'python-flask-principal' 'python-flask-wtf' 'python-flask-babelex'
             'python-itsdangerous' 'python-passlib' 'python-build' 'python-pip'
             'python-setuptools')
source=("https://github.com/mattupstate/flask-security/archive/$pkgver.tar.gz")
sha512sums=('f89b0fe7e1bd5fe79b4b53ce48c9b38fdfcb37247188d043595d678d8e1d5f018d54682b402bbb1b79506ab4ce03f18d77e71c5f5d648cc84868107988ec5517')

build() {
  cd "$_pkgname-3.0-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-3.0-$pkgver"

  python setup.py install --root="$pkgdir" -O1 --skip-build

  install -Dm 644 README.rst CHANGES -t "$pkgdir/usr/share/doc/$pkgname"
  install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}

